package LocalDate;

import java.time.LocalDate;

/**
 * LocalDate类:
 *   它里面封装的只有年月日,而且默认格式为年-月-日
 * 获取功能:
 *    static LocalDate now()
 *    public int getYear()
 *    Month getMonth()
 *    int getDayOfMonth()
 */
public class LocalDateDemo {
    public static void main(String[] args) {
        //method01();
        LocalDate now = LocalDate.now();
        int year = now.getYear();
        int monthValue = now.getMonthValue();
        int dayOfMonth = now.getDayOfMonth();
        System.out.println(year + " " + monthValue + " " + dayOfMonth);
    }

    private static void method01() {
        LocalDate now = LocalDate.now();//获取的是当前的年月日(系统时间)
        System.out.println(now);
    }
}
